#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
int main() {
	int count = 0;
	scanf("%d", &count);
	int factorial(int);
	printf("%d", factorial(count));

	return 0;
}

int factorial(int count) {
	if (count >= 1) {
		return count * factorial(count - 1);
	}
	else {
		return 1;
	}
}